package seafileclient

import (
	"encoding/json"
	"fmt"
	"photoPlugIn/config"
)

func GetToken() {
	fmt.Println("开始获取token...")
	song := make(map[string]interface{})
	song["username"] = config.CONFIG.SEAFILEUSER
	song["password"] = config.CONFIG.SEAFILEPASSWD
	bytesData, err := json.Marshal(song)
	if err != nil {
		fmt.Println("mapTojson失败", err)
		return
	}
	codeNum, dataStr := httpReq(URL_LIST["URL_POST_TOKEN"], "POST", bytesData)
	fmt.Println("codeNum:", codeNum, "dataStr:", dataStr)
}
